package com.zhangfb95.crosschain.protocol.routerpluginapi;

import com.zhangfb95.crosschain.protocol.routerpluginapi.request.QueryPluginReq;
import com.zhangfb95.crosschain.protocol.routerpluginapi.request.SendPluginReq;
import com.zhangfb95.crosschain.protocol.routerpluginapi.response.GetBlockByNumberPluginRes;
import com.zhangfb95.crosschain.protocol.routerpluginapi.response.GetTxByIdPluginRes;
import com.zhangfb95.crosschain.protocol.routerpluginapi.response.QueryPluginRes;
import com.zhangfb95.crosschain.protocol.routerpluginapi.response.SendPluginRes;

import java.util.List;

/**
 * @author zhangfubing
 * @since 2023/12/3
 */
public interface PluginService {

    boolean isEnable();

    String getChainName();

    List<String> listChainPath();

    long getHeight(String chainPath);

    GetBlockByNumberPluginRes getBlockByNumber(String chainPath, Long blockNumber);

    GetTxByIdPluginRes getTxById(String chainPath, String txId);

    QueryPluginRes query(QueryPluginReq req);

    SendPluginRes send(SendPluginReq req);
}
